<template>
	<view class="grzx-body">
		<img :src="getImg('grzx-noimg.png')" class="zwscstyleimg" v-if="datas.length<=0">
		<div class="zwscstyle" v-if="datas.length<=0">暂无评论，快去点评吧！</div>
		<div class="homebj">
		    <div class="hdbmall yrxmdmargin" v-if="datas.length>0">
		        <div class="hdbmlist" v-for="(el,ind) in datas" @click="pldwclick(el.wareId)">
		            <div class="yrxmdleft">
		                <img v-if="el.userImg != ''" ms-attr="{src: el.userImg}" class="yrxmdimg">
		                <img v-if="el.userImg == ''" :src="getImg('touxiang.png')" class="yrxmdimg">
		            </div>
		            <div class="yrxmdright">
		                <div class="yrxmdname">{{el.name}}</div>
		                <div class="yrxmdtime">{{el.createTime}}</div>
		                <div class="yrxmdtime">评论单位：{{el.wareName}}</div>
		                <div class="dwxqcontent">评论内容：{{el.content}}</div>
		            </div>
		        </div>
		    </div>
		</div>
	</view>
</template>

<script>
	import web from '../../components/utils/request.js';
	export default {
		data() {
			return {
				datas: [],
				pageNo: 1,
				pageSize: 20,
			}
		},
		onLoad(options) {

		},
		onReady() {
			this.getData();
		},
		methods: {
			getImg(url) {
				return 'https://ruianm.tour-ma.com/r/cms/www/m/huodong/img/' + url;
			},
			getImg1(url) {
				return 'https://ruianm.tour-ma.com' + url;
			},
			getData(){
				var url = "/myComments.jspx";
				var arg = {pageNo:this.pageNo,pageSize:this.pageSize};
				var that = this;
				web.httpPost(that, url, arg, function(res) {
					that.datas = res.data.data;
				})
			},
			pldwclick: function(wareId) {
				uni.navigateTo({
					url:'./dwxqid='+wareId
				})
			}
		}
	}
</script>

<style>
	@import url("@/components/css/datascss.css");
</style>
